package com.hyxt.provider;

import com.alibaba.dubbo.config.annotation.Reference;
import com.hyxt.DO.Loginfo;
import com.hyxt.DO.Logopera;
import com.hyxt.api.MysqlDataService;
import org.springframework.stereotype.Component;

@Component
public class TestA {
    @Reference(version="1.0.0")
    MysqlDataService mysqlDataService;
    /*@Autowired
    private LoginfoMapper loginfoMapper;*/
    public void getData()throws Exception{
        Loginfo loginfo = new Loginfo();
        loginfo.setId(1);
        System.out.println("传入Loginfo实体：");
        Loginfo loginfoReturn = (Loginfo)mysqlDataService.selectByPrimaryKey(loginfo);
        System.out.println(loginfoReturn.getLogtime()+"-------------------------");
        Logopera logopera = new Logopera();
        logopera.setId(1);
        System.out.println("传入Logopera实体：");
        Logopera logoperaReturn = (Logopera)mysqlDataService.selectByPrimaryKey(logopera);
        System.out.println(logoperaReturn.getLogtime()+"-------------------------");
    }
}
